package com.example.yc23.demo.controller.fore;

import com.example.yc23.demo.pojo.FilmType;
import com.example.yc23.demo.service.FilmTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/fore/type")
public class ForeTypeController {
    @Autowired
    private FilmTypeService filmTypeService;

    /**
     * 以JSON形式返回电影类别列表
     * @return
     */
    @RequestMapping("/list")
    public List<FilmType> list(){
        return filmTypeService.list();
    }

}
